use "/Users/jimgolby/Desktop/ZB - Confidence Book/Data/Final Wave 1 Survey/Wave 1 Weighted.dta"
cd "/Users/jimgolby/Desktop/ZB - Confidence Book/Technical Appendix/Chapter 6/TA Files"


***Defining Variables***
replace q8 =. if q8 > 4

generate q8a = .
replace q8a = 0 if q8 < 5
replace q8a = 1 if q8 < 3

label define CONFIDENCE 0 "Not Confident" 1 "Confidence"
label values q8a CONFIDENCE

generate pid3 =.
replace pid3 = 1 if partyid7 < 4
replace pid3 = 2 if partyid7 == 4
replace pid3 = 3 if partyid7 > 4

label define PARTY 1 "Democrats" 2 "Independents" 3 "Republicans"
label values pid3 PARTY

generate dem = 0 if pid3 < 4
replace dem = 1 if pid3 == 1
generate rep = 0 if pid3 < 4
replace rep = 1 if pid3 == 3
generate ind = 0 if pid3 < 4
replace ind = 1 if pid3 == 2

generate ideo3 =.
replace ideo3 = 1 if ideo < 4
replace ideo3 = 2 if ideo == 4
replace ideo3 = 3 if ideo > 4 & ideo < 8

generate ideo3a = ideo3
replace ideo3a = 4 if ideo == 8

gen lib = 0
replace lib = 1 if ideo3 == 1
gen mod = 0
replace mod = 1 if ideo3 == 2
gen con = 0
replace con = 1 if ideo3 == 3

generate woman = 0
replace woman = 1 if gender == 2
generate male = 0
replace male = 1 if gender == 1

gen vet = veteran if veteran < 98
replace vet = 0 if veteran == 2
replace vet = 0 if veteran2 == 1
replace vet =. if veteran2 == 98

gen activeduty = 0 if veteran < 98
replace activeduty =. if veteran2 == 98
replace activeduty = 1 if veteran2 == 1

generate milvet= 0
replace milvet = 1 if vet == 1
replace milvet = 2 if activeduty == 1

generate post911vet = 0
replace post911vet = 1 if milvet > 0 & vet_date1 < 2001
replace post911vet = 2 if milvet > 0 & vet_date1 > 2000

generate social = 0 if q45 < 98
replace social = 1 if q45 == 1

generate family = 0 if q46 < 98
replace family = 1 if q46 == 1
replace family = . if q46b_dk == 1

generate religion = 0 if relig < 98
replace religion = 1 if relig == 1
replace religion = 2 if relig == 2
replace religion = 3 if relig > 8 & relig < 12
replace religion = 1 if relig == 12

label define RELIGION2 0 "Other" 1 "Christian" 2 "Catholic" 3 "None"
label values religion RELIGION2

generate christian = 0
replace christian = 1 if religion == 1
generate catholic = 0
replace catholic = 1 if religion == 2
generate norelig = 0
replace norelig = 1 if religion == 3

generate white = 0
replace white = 1 if racethnicity == 1
generate black = 0
replace black = 1 if racethnicity == 2
replace black = 1 if racethnicity == 3
generate hispanic = 0
replace hispanic = 1 if racethnicity == 4
generate asian = 0
replace asian = 1 if racethnicity == 6

gen race2 = racethnicity
replace race2 =. if racethnicity == 3
replace race2 =. if racethnicity == 5

label define RACE 1 "White" 2 "Black" 4 "Hispanic" 6 "Asian"
label values race2 racethnicity RACE

generate generation =.
replace generation = 1 if age > 73
replace generation = 2 if age > 54 & age < 74
replace generation = 3 if age > 38 & age < 55
replace generation = 4 if age > 22 & age < 39
replace generation = 5 if age < 23

generate silent = 0
replace silent = 1 if generation == 1
generate boomer = 0
replace boomer = 1 if generation == 2
generate genx = 0
replace genx = 1 if generation == 3
generate milen = 0
replace milen = 1 if generation == 4
generate genz = 0
replace genz = 1 if generation == 5

generate northeast = 0
replace northeast = 1 if region4 == 1
generate midwest = 0
replace midwest = 1 if region4 == 2
generate south = 0
replace south = 1 if region4 == 3 
generate west = 0
replace west = 1 if region4 == 4 

generate city = 0
replace city = 1 if urban3 == 1
generate suburban = 0
replace suburban = 1 if urban3 == 2
generate rural = 0
replace rural = 1 if urban3 == 3

generate unemployed = 0 if employ < 3
replace unemployed = 1 if employ > 2
replace unemployed = 0 if employ == 5

generate income5 =.
replace income5 = 1 if income < 5
replace income5 = 2 if income > 4 & income < 9
replace income5 = 3 if income > 8 & income < 12
replace income5 = 4 if income > 11 & income < 15
replace income5 = 5 if income > 14

gen married =.
replace married = 1 if marital == 1
replace married = 0 if marital > 1

replace q14=. if q14 > 76
replace age=. if age == 286

gen d2 = 0
gen d3 = 0
gen d4 = 0
gen d5 = 0
gen d6 = 0
gen d7 = 0
gen d8 = 0

replace d2 = 1 if dov_assignment_a == 2
replace d3 = 1 if dov_assignment_a == 3
replace d4 = 1 if dov_assignment_a == 4
replace d5 = 1 if dov_assignment_a == 5
replace d6 = 1 if dov_assignment_a == 6
replace d7 = 1 if dov_assignment_a == 7
replace d8 = 1 if dov_assignment_a == 8

gen p2 = 0
gen p3 = 0
gen p4 = 0
gen p5 = 0
gen p6 = 0
gen p7 = 0
gen p8 = 0

replace p2 = 1 if dov_assignment_c == 2
replace p3 = 1 if dov_assignment_c == 3
replace p4 = 1 if dov_assignment_c == 4
replace p5 = 1 if dov_assignment_c == 5
replace p6 = 1 if dov_assignment_c == 6
replace p7 = 1 if dov_assignment_c == 7
replace p8 = 1 if dov_assignment_c == 8

gen educ5 = educ4
replace educ5 = 5 if educ > 12 & educ < 15

gen q15a2 = 0 if q15a < 77
replace q15a2 = 1 if q15a < 3
gen q15b2 = 0 if q15b < 77
replace q15b2 = 1 if q15b < 3
gen q15c2 = 0 if q15c < 77
replace q15c2 = 1 if q15c < 3
gen q15d2 = 0 if q15d < 77
replace q15d2 = 1 if q15d < 3
gen q15e2 = 0 if q15e < 77
replace q15e2 = 1 if q15e < 3
gen q15f2 = 0 if q15f < 77
replace q15f2 = 1 if q15f < 3
gen q15g2 = 0 if q15g < 77
replace q15g2 = 1 if q15g < 3

gen q42a2 = 0 if q42a < 77
replace q42a2 = 1 if q42a < 3
gen q42f2 = 0 if q42f < 77
replace q42f2 = 1 if q42f < 3


label define Confidence 0 "Not Confident" 1 "Confident"
label values q8a Confidence

replace q12a =. if q12a > 5
replace q12b =. if q12b > 5
replace q12c =. if q12c > 5
replace q12d =. if q12d > 5
replace q12e =. if q12e > 5
replace q12f =. if q12f > 5
replace q12g =. if q12g > 5
replace q8 =. if q8 > 4

gen q12a2 = 0 if q12a < 77
replace q12a2 = 1 if q12a < 3
gen q12b2 = 0 if q12b < 77
replace q12b2 = 1 if q12b < 3
gen q12c2 = 0 if q12c < 77
replace q12c2 = 1 if q12c < 3
gen q12d2 = 0 if q12d < 77
replace q12d2 = 1 if q12d < 3
gen q12e2 = 0 if q12e < 77
replace q12e2 = 1 if q12e < 3
gen q12f2 = 0 if q12f < 77
replace q12f2 = 1 if q12f < 3
gen q12g2 = 0 if q12g < 77
replace q12g2 = 1 if q12g < 3

recode q12a q12b q12c q12d q12e q12f q12g (1=5)(5=1)(2=4)(4=2)

label values q42a2 Support_Trump

********************

*****Figure 6.5*****
eststo: quietly logit q42a2 p3 p4 p5 p6 dem rep ideo3 male activeduty vet family social catholic christian norelig white black hispanic asian educ5 boomer genx milen genz midwest south west city rural unemployed income5 married [pweight=weight], cformat(%9.2f)

eststo: quietly logit q42a2 p3 p4 p5 p6 ideo3 male activeduty vet family social catholic christian norelig white black hispanic asian educ5 boomer genx milen genz midwest south west city rural unemployed income5 married if pid3 == 1 [pweight=weight], cformat(%9.2f)

eststo: quietly logit q42a2 p3 p4 p5 p6 ideo3 male activeduty vet family social catholic christian norelig white black hispanic asian educ5 boomer genx milen genz midwest south west city rural unemployed income5 married if pid3 == 3 [pweight=weight], cformat(%9.2f)

esttab est1 est2 est3 using app12.rtf, ti ({\rtf1\ansi\deff0 {\fonttbl {\f0 Monotype Century;}} \f0\fs32\b Appendix Table 12: Support for Border Deployment}) mtitle("Support Mission" "Support Mission, Democrats" "Support Mission, Republicans") se stats(N r2_p, fmt(0 3)) replace label nogap onecell cells(b(star fmt(2)) se(par)) fonttbl(\f0\fnil Century;f1\fnil Century;) addnotes({\i Note:                                                         *p<0.1; **p<0.05; ***p<0.01}) coeflabels(p3 "Trump Politicizes" p4 "Dem Politicizes" p5 "Military Supports" p6 "Military Opposes" dem "Democrat" rep "Republican" ideo3 "Ideology" male "Male" activeduty "Active Duty" vet "Veteran" family "Family" social "Social Contact" catholic "Catholic" Christian "Christian" norelig "No Religion" white "White" black "Black" hispanic "Hispanic" asian "Asian" educ5 "Education" boomer "Boomer" genx "Generation X" milenial "Milenial" genz "Generation Z" midwest "Midwest" south "South" west "West" city "City" rural "Rural" unemployed "Unemployed" income5 "Income" married "Married")


********************

clear all

********************
use "/Users/jimgolby/Desktop/ZB - Confidence Book/Technical Appendix/Data Files/Wave 2.dta"

***Define Variables***
replace Q11 =. if Q11 == 98
generate Q11T =.
replace Q11T = 0 if Q11 > 2
replace Q11T = 1 if Q11 < 3
replace Q11T =. if Q11 ==.

label define Confidence 0 "Not Confident" 1 "Confident"
label values Q11T Confidence

generate Q11H =.
replace Q11H = 0 if Q11 > 1
replace Q11H = 1 if Q11 == 1

generate PID3 =.
replace PID3 = 1 if PARTYID < 4
replace PID3 = 2 if PARTYID == 4
replace PID3 = 3 if PARTYID > 4 & PARTYID < 8

label define PID3 1 "Dem" 2 "Ind" 3 "Rep"
label values PID3 PID3

gen DEM = 0 if PID3 < 4
replace DEM = 1 if PID3 == 1
gen REP = 0 if PID3 < 4
replace REP = 1 if PID3 == 3
gen IND = 0 if PID3 < 4
replace IND = 1 if PID3 == 2

replace IDEO =. if IDEO == 98

gen IDEO3 = .
replace IDEO3 = 1 if IDEO < 4
replace IDEO3 = 2 if IDEO == 4
replace IDEO3 = 3 if IDEO > 4 & IDEO < 8

gen IDEO3a = IDEO3
replace IDEO3a = 4 if IDEO == 8

gen LIB = 0
replace LIB = 1 if IDEO3 == 1
gen MOD = 0
replace MOD = 1 if IDEO3 == 2
gen CON = 0
replace CON = 1 if IDEO3 == 3

gen MALE = 0
replace MALE = 1 if GENDER == 1

gen VET = VETERAN if VETERAN < 98
replace VET = 0 if VETERAN == 2
replace VET = 0 if VETERAN2 == 1
replace VET = . if VETERAN2 == 98


gen ACTIVEDUTY = 0 if VETERAN < 98
replace ACTIVEDUTY = . if VETERAN2 == 98
replace ACTIVEDUTY = 1 if VETERAN2 == 1

generate FAMILY = 0 if Q39 < 77
replace FAMILY = 1 if Q39 == 1

gen SOCIAL = 0 if Q38 < 98
replace SOCIAL = 1 if Q38 == 1

generate religion = 0 if RELIG < 98
replace religion = 1 if RELIG == 1
replace religion = 1 if RELIG == 3
replace religion = 1 if RELIG == 4
replace religion = 1 if RELIG == 12
replace religion = 2 if RELIG == 2
replace religion = 3 if RELIG > 8 & RELIG < 12
label define RELIGION2 0 "Other" 1 "Christian" 2 "Catholic" 3 "None"
label values religion RELIGION2

generate christian = 0
replace christian = 1 if religion == 1
generate catholic = 0
replace catholic = 1 if religion == 2
generate norelig = 0
replace norelig = 1 if religion == 3

generate white = 0
replace white = 1 if RACE == 1
generate black = 0
replace black = 1 if RACE == 2
generate hispanic = 0
replace hispanic = 1 if RACE == 4
generate asian = 0
replace asian = 1 if RACE == 6

gen RACE2 = RACE if RACETHNICITY < 77

label define RACE 1 "White" 2 "Black" 4 "Hispanic" 6 "Asian"
label values RACE2 RACE

generate generation =.
replace generation = 1 if AGE > 73
replace generation = 2 if AGE > 54 & AGE < 74
replace generation = 3 if AGE > 38 & AGE < 55
replace generation = 4 if AGE > 22 & AGE < 39
replace generation = 5 if AGE < 23

label define GENERATION 1 "Silent" 2 "Boomer" 3 "Gen X" 4 "Millennial" 5 "Gen Z"
label values generation GENERATION

generate silent = 0
replace silent = 1 if generation == 1
generate boomer = 0
replace boomer = 1 if generation == 2
generate genx = 0
replace genx = 1 if generation == 3
generate milen = 0
replace milen = 1 if generation == 4
generate genz = 0
replace genz = 1 if generation == 5

gen midwest = 0
replace midwest = 1 if REGION4 == 2
gen south = 0
replace south = 1 if REGION4 == 3
gen west = 0
replace west = 1 if REGION4 == 4

replace URBAN3 =. if URBAN3 < 1
generate city = 0
replace city = 1 if URBAN3 == 1
generate rural = 0
replace rural = 1 if URBAN3 == 3

generate unemployed = 0 if EMPLOY < 3  
replace unemployed = 1 if EMPLOY > 2
replace unemployed = 0 if EMPLOY == 5

generate INCOME5 =.
replace INCOME5 = 1 if INCOME < 5
replace INCOME5 = 2 if INCOME > 4 & INCOME < 9
replace INCOME5 = 3 if INCOME > 8 & INCOME < 12
replace INCOME5 = 4 if INCOME > 11 & INCOME < 15
replace INCOME5 = 5 if INCOME > 14

gen married =.
replace married = 1 if MARITAL == 1
replace married = 0 if MARITAL > 1

gen EDUC3 = . if EDUC5 > 5
replace EDUC3 = 1 if EDUC5 < 3
replace EDUC3 = 2 if EDUC5 == 3
replace EDUC3 = 2 if EDUC5 == 4
replace EDUC3 = 3 if EDUC5 == 5

replace Q14 =. if Q14 > 76
replace Q15 =. if Q15 > 76
replace Q16 =. if Q16 > 76

generate Q14T = 0 if Q14 > 2
replace Q14T = 1 if Q14 < 3

generate Q15T = 0 if Q15 > 2
replace Q15T = 1 if Q15 < 3

generate Q16T = 0 if Q16 > 2
replace Q16T = 1 if Q16 < 3

gen d2 = 0
gen d3 = 0
gen d4 = 0
gen d5 = 0
gen d6 = 0
gen d7 = 0
gen d8 = 0

replace d2 = 1 if P_ASSIGN1 == 2
replace d3 = 1 if P_ASSIGN1 == 3
replace d4 = 1 if P_ASSIGN1 == 4
replace d5 = 1 if P_ASSIGN1 == 5
replace d6 = 1 if P_ASSIGN1 == 6
replace d7 = 1 if P_ASSIGN1 == 7
replace d8 = 1 if P_ASSIGN1 == 8

replace Q41 =. if Q41 > 4
generate Q41T =.
replace Q41T = 0 if Q41 > 2 & Q41 < 5
replace Q41T = 1 if Q41 < 3

gen EDUC4 = EDUC5
replace EDUC4 = 4 if EDUC5 == 5

xi I.DEM*EDUC5 I.REP*EDUC5 I.DEM*EDUC4 I.REP*EDUC4, prefix(_I)

replace Q37 =. if Q37 == 98
replace Q38 =. if Q38 == 98
replace Q39 =. if Q39 == 98

gen Q39AA = .
replace Q39AA = 1 if Q39A_1 == 1
replace Q39AA = 2 if Q39A_2 == 1
replace Q39AA = 3 if Q39A_3 == 1
replace Q39AA = 4 if Q39A_4 == 1
replace Q39AA = 5 if Q39A_5 == 1
replace Q39AA = 6 if Q39A_6 == 1

gen Q39FAM = 0 if Q39 < 98
replace Q39FAM = 1 if Q39BA == 1
replace Q39FAM = 2 if Q39BA == 2
replace Q39FAM = 3 if Q39BA == 3
replace Q39FAM = . if Q39BA == 77
replace Q39FAM = 1 if Q39BB == 1
replace Q39FAM = 2 if Q39BB == 2
replace Q39FAM = 3 if Q39BB == 3
replace Q39FAM = . if Q39BB == 77
replace Q39FAM = 1 if Q39BC == 1
replace Q39FAM = 2 if Q39BC == 2
replace Q39FAM = 3 if Q39BC == 3
replace Q39FAM = . if Q39BC == 77
replace Q39FAM = 1 if Q39BD == 1
replace Q39FAM = 2 if Q39BD == 2
replace Q39FAM = 3 if Q39BD == 3
replace Q39FAM = . if Q39BD == 77
replace Q39FAM = 1 if Q39BE == 1
replace Q39FAM = 2 if Q39BE == 2
replace Q39FAM = 3 if Q39BE == 3
replace Q39FAM = . if Q39BE == 77
replace Q39FAM = 1 if Q39BF == 1
replace Q39FAM = 2 if Q39BF == 2
replace Q39FAM = 3 if Q39BF == 3
replace Q39FAM = . if Q39BF == 77

gen Q39FAM1 = 0 if Q39FAM < 4
replace Q39FAM1 = 1 if Q39 == 1

gen Q39FAMpre = 0 if Q39FAM < 4
replace Q39FAMpre = 1 if Q39FAM == 1
gen Q39FAMpost = 0 if Q39FAM < 4
replace Q39FAMpost = 1 if Q39FAM == 2
gen Q39FAMboth = 0 if Q39FAM < 4
replace Q39FAMboth = 0 if Q39FAM == 2
replace Q39FAMboth = 1 if Q39FAM == 3

gen Q39FAM2pre = 0 if Q39FAM < 4
replace Q39FAM2pre = 1 if Q39FAM == 1
gen Q39FAM2post = 0 if Q39FAM < 4
replace Q39FAM2post = 1 if Q39FAMpost == 1
replace Q39FAM2post = 1 if Q39FAMboth == 1

gen Q17A3 = Q17A if Q17A < 4

gen Q17AR = 0 if Q17A3 < 4
replace Q17AR = 1 if Q17A3 == 2

gen Q17AREP = Q17AR
replace Q17AREP = 0 if Q17B == 1
replace Q17AREP = 0 if Q17B == 3
replace Q17AREP = 1 if Q17B == 2

gen Q7T = 0 if Q7 < 77
replace Q7T = 1 if Q7 < 3
replace Q7T = . if DOV_INST ==.

gen Q8A2 = 0 if Q8A < 77
replace Q8A2 = 1 if Q8A < 3
gen Q8B2 = 0 if Q8B < 77
replace Q8B2 = 1 if Q8B < 3
gen Q8C2 = 0 if Q8C < 77
replace Q8C2 = 1 if Q8C < 3
gen Q8D2 = 0 if Q8D < 77
replace Q8D2 = 1 if Q8D < 3
gen Q8E2 = 0 if Q8E < 77
replace Q8E2 = 1 if Q8E < 3
gen Q8F2 = 0 if Q8F < 77
replace Q8F2 = 1 if Q8F < 3
gen Q8G2 = 0 if Q8G < 77
replace Q8G2 = 1 if Q8G < 3
gen Q8H2 = 0 if Q8H < 77
replace Q8H2 = 1 if Q8H < 3

gen Q17C =.
replace Q17C = Q17A if Q17A < 98
replace Q17C = Q17B if Q17B < 98

gen Q17MD =.
replace Q17MD = 1 if Q17C == 1
replace Q17MD = 0 if Q17C == 2
replace Q17MD = 0 if Q17C == 3

gen Q17MR =.
replace Q17MR = 1 if Q17A == 2
replace Q17MR = 0 if Q17A == 1
replace Q17MR = 0 if Q17A == 3


****************

*****Table 6.6*****
tab Q18 PID3 if P_ASSIGN1 == 1 & Q18 < 98 [aweight=weight2], column
tab Q19 PID3 if P_ASSIGN1 == 1 & Q19 < 98 [aweight=weight2], column

eststo: quietly reg Q18 Q11T DEM REP IDEO3 MALE ACTIVEDUTY VET FAMILY SOCIAL catholic christian norelig white black hispanic asian EDUC5 boomer genx milen genz midwest south west city rural unemployed INCOME5 married if Q18 < 77 [pweight = weight2]

eststo: quietly reg Q18 Q11T IDEO3 MALE ACTIVEDUTY VET FAMILY SOCIAL catholic christian norelig white black hispanic asian EDUC5 boomer genx milen genz midwest south west city rural unemployed INCOME5 married if Q18 < 77 & DEM == 1 [pweight = weight2]

eststo: quietly reg Q18 Q11T IDEO3 MALE ACTIVEDUTY VET FAMILY SOCIAL catholic christian norelig white black hispanic asian EDUC5 boomer genx milen genz midwest south west city rural unemployed INCOME5 married if Q18 < 77 & IND == 1 [pweight = weight2]

eststo: quietly reg Q18 Q11T IDEO3 MALE ACTIVEDUTY VET FAMILY SOCIAL catholic christian norelig white black hispanic asian EDUC5 boomer genx milen genz midwest south west city rural unemployed INCOME5 married if Q18 < 77 & REP == 1 [pweight = weight2]

esttab est1 est2 est3 est4 using app13.rtf, ti ({\rtf1\ansi\deff0 {\fonttbl {\f0 Monotype Century;}} \f0\fs32\b Appendix Table 13: Perceptions of the Degree to Which Partisanship Divides the U.S. and Confidence, by Party}) se stats(N r2, fmt(0 3)) replace label nogap onecell cells(b(star fmt(2)) se(par)) fonttbl(\f0\fnil Century;f1\fnil Century;) addnotes({\i Note:                                                         *p<0.1; **p<0.05; ***p<0.01}) mtitle("US Divided By Party" "Democrats" "Independents" "Republicans") coeflabels(Q11T "Confidence" DEM "Democrat" REP "Republican" IDEO3 "Ideology" MALE "Male" ACTIVEDUTY "Active Duty" VET "Veteran" FAMILY "family" SOCIAL "Social Contact" catholic "Catholic" christian "Christian" norelig "No Religion" white "White" black "Black" hispanic "Hispanic" asian "Asian" EDUC5 "Education" boomer "Boomer" genx "Generation X" milen "Milennial" genz "Generation Z" midwest "Midwest" south "South" west "West" city "City" rural "Rural" unemployed "Unemployed" INCOME5 "Income" married "Married")


*****Table 6.7*****
eststo: quietly logit Q11T Q17MD Q17MR DEM REP IDEO3 MALE ACTIVEDUTY VET FAMILY SOCIAL catholic christian norelig white black hispanic asian EDUC5 boomer genx milen genz midwest south west city rural unemployed INCOME5 married [pweight = weight2]

eststo: quietly logit Q11T Q17MD Q17MR IDEO3 MALE ACTIVEDUTY VET FAMILY SOCIAL catholic christian norelig white black hispanic asian EDUC5 boomer genx milen genz midwest south west city rural unemployed INCOME5 married if PID3 == 1 [pweight = weight2]

eststo: quietly logit Q11T Q17MD Q17MR IDEO3 MALE ACTIVEDUTY VET FAMILY SOCIAL catholic christian norelig white black hispanic asian EDUC5 boomer genx milen genz midwest south west city rural unemployed INCOME5 married if PID3 == 3 [pweight = weight2]


esttab est5 est6 est7 using app14.rtf, ti ({\rtf1\ansi\deff0 {\fonttbl {\f0 Monotype Century;}} \f0\fs32\b Appendix Table 14: Confidence and Perceptions of the Military's Partisan Composition, by Party}) se stats(N r2_p, fmt(0 3)) replace label nogap onecell cells(b(star fmt(2)) se(par)) fonttbl(\f0\fnil Century;f1\fnil Century;) addnotes({\i Note:     *p<0.1; **p<0.05; ***p<0.01}) mtitle("Confidence" "Confidence among Democrats" "Confidence among Republicans") coeflabels(Q17MD "Mil Mostly Democrats" Q17MR "Mil Mostly Republicans" DEM "Democrat" REP "Republican" IDEO3 "Ideology" MALE "Male" ACTIVEDUTY "Active Duty" VET "Veteran" FAMILY "family" SOCIAL "Social Contact" catholic "Catholic" christian "Christian" norelig "No Religion" white "White" black "Black" hispanic "Hispanic" asian "Asian" EDUC5 "Education" boomer "Boomer" genx "Generation X" milen "Milennial" genz "Generation Z" midwest "Midwest" south "South" west "West" city "City" rural "Rural" unemployed "Unemployed" INCOME5 "Income" married "Married")
